package bigbeard.tools.net.server;


import bigbeard.tools.net.api.server.IConnector;

/**
 * @author bigbeard on 2022-09-30
 */
public abstract class BaseConnector implements IConnector {
    protected static final int SEND_ERROR = -1;

    private long lastTime = 0;
    private String code = "";

    @Override
    public long getLastMsgTime() {
        return lastTime;
    }

    @Override
    public void updateLastMsgTime() {
        lastTime = System.currentTimeMillis();
    }

    @Override
    public void setCode(String info) {
        code = info;
    }

    @Override
    public String getCode() {
        return code;
    }

}
